<!DOCTYPE html>

<html>
	<title> 编辑SN_ID </title>
	<head>
		<meta http-equiv="Content-Type" content="text/css; charset=utf-8">
		<link rel="stylesheet" href="{{ static_url("css/button.css") }}">
		<script src="{{ static_url("js/utils.js")}}"></script>
		<script src="{{ static_url("js/jquery.min.js")}}"></script>

		<style type="text/css">
			body {
				background:		#e0f0e9;
				/*text-align: 	center;*/
				font-family: 	verdana;
			}

			div.content {
				margin-left: 	4cm;
				margin-top: 	2cm;
			}

			span.item {
				display:		-moz-inline-box;
				display:		inline-block;
				width:			100px; 
				margin-bottom: 	10px;
			}

		</style>

	</head>
	
	<body>

		<div class="content">
			<h3>编辑SN_ID:</h3>
            <!-- <span class="item"> 测试SN_IDS </span>: -->
            <span class="item"> <textarea id="sn_ids_str" name="sn_ids_str" style="width:300px; height:100px; font-size:15px;" warp="virtual">{{sn_ids_str}}</textarea> </span> </br>

            <div style="margin: 1cm 0cm 0cm 4cm">
            	<a href="#" class="button" id="edit"> 修改 </a>
            	<a href="/" class="button"> 首页 </a>
            </div>

    	</div>

	</body>
</html>


<script type="text/javascript">

	$("a#edit").click(function() {
		var confirm = window.confirm("确定提交更新?");
		if (confirm != true) {
			return;
		}

		var sn_ids_str = $("textarea#sn_ids_str").val();
		console.log("sn_ids_str:" + sn_ids_str);

		var params = {
			sn_ids: 	sn_ids_str
		};
		$.post(getLocalHost() + "/manage/sn_id", params,
			function(msg, status, xhr) {
				console.log("msg: " + JSON.stringify(msg));
				alert(msg.info);
			});
		});


</script>
